package org.javacore.StreamsTutorial;

import java.util.function.Supplier;

/**
 * Created by IntelliJ IDEA.
 * User: Fan
 * Date: 2018/7/7
 * Time: 23:04
 */
public class FibonacciSupplier implements Supplier<Long>{
    long a = 0;
    long b = 1;

    @Override
    public Long get() {
        long x = a + b;
        a = b;
        b = x;
        return a;
    }
}
